package com.lagou.rpc.consumer.conf;

import com.lagou.rpc.api.ITestRPCService;
import com.lagou.rpc.api.IUserService;
import com.lagou.rpc.consumer.proxy.RpcClientProxy;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author stevejson
 */
@Configuration
public class RPCBeanConf {

    @Bean
    public IUserService createUserService(){
        return (IUserService) RpcClientProxy.createProxy(IUserService.class);
    }

    @Bean
    public ITestRPCService createTestRPCService(){
        return (ITestRPCService) RpcClientProxy.createProxy(ITestRPCService.class);
    }

}
